11th Chapter Sort and find
The concept of algorithms
An algorithm (algorithm) is a series of steps that convert a set of inputs into a set of outputs, each of which must be completed within a limited time. For example, a group of
Seven Principles of Software Design
The general principles of design patterns are as follows:
1.Open-closed principle ):A software entity should be responsible for extended development and should be closed for modifications. when designing another
LSP the liskov substitution principleThe main mechanism behind the OCP principle is abstraction and polymorphism. Inheritance is the key mechanism supporting abstraction and polymorphism.Definition of LSPIf the object P1 of each type P has a class C
Definition:
Objects in a program should be replaced by its subclass without changing the program's correctness. That is to say, all objects that reference the base class must be transparently used. In general, child classes can extend the functions
abstract class: Abstract classes cannot create objects and are used primarily to create subclasses. Abstract classes in Java are defined using the abstract modifier.abstract data type ADT: the abstract data type indicates the possible types and
Liskov substitution principle: subtypes (subtype) must be able to replace their base type (BaseType).Violation of LSP situationBreaches of LSP often result in the use of run-time type checking in a way that is clearly a violation of the OCP.
BeginThese tutorials are not a machine learning program for undergraduates or graduate students, but rather a quick conceptual endorsement. To continue with the next tutorial, you need to download the database mentioned in this chapter.DownloadYou
Is Code Write comments are always the majority Program Personnel have some troubles. Currently, programmers can all accept comments for program maintainability and readability encoding, but such questions include where to write comments, how to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.